package edu.hubu.commons.config;

import com.alibaba.csp.sentinel.adapter.servlet.callback.WebCallbackManager;
import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import edu.hubu.commons.handler.CustomUrlBlockHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author moonlan
 * date 2021/1/25 下午3:17
 */
@SuppressWarnings(value = "unused")
@Configuration
public class ComponentConfig {

    @PostConstruct
    public void init() {
        WebCallbackManager.setUrlBlockHandler(new CustomUrlBlockHandler());
    }

}
